package com.example;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

@Component
@PropertySource("classpath:application.yml") //读取配置文件
@ConfigurationProperties(prefix = "my.config") //读取zd.getocs节点
@Data
public class MyConfig {
    private String saveDirectory;
}
